<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改考试成绩')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-exam-edit" th:object="${eduExam}">
            <input name="examId" th:field="*{examId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">姓名：</label>
                <select id="student" th:field="*{studentId}" class="form-control select2-multiple">
                    <option th:each="student:${students}" th:value="${student.studentId}" th:text="${student.studentName}" th:selected="${student.studentId==studentId}"></option>
                </select>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程：</label>
                <div class="col-sm-8">
                    <input name="courseId" th:field="*{courseId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分数：</label>
                <div class="col-sm-8">
                    <input name="score" th:field="*{score}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/exam";
        $("#form-exam-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-exam-edit').serialize());
            }
        }
    </script>
</body>
</html>